/**
 * Created by liujz on 3/6/17.
 */

class Klass{
    constructor(num){
        this.num = num;
        this.leader = null;
        this.members = new Set();
    }

    assignLeader(student) {
        if (this.members.has(student)) {
            this.leader = student;
        }else{
            console.log('It is not one of us.');
        }
    }

    appendMember(student){
        student.klass = this;
        this.members.add(student);
    }

    isIn(student){
        return this.members.has(student);
    }
}

module.exports.Klass = Klass;